import React from 'react'
import { Layout} from 'antd';
import { Route,Switch,Redirect } from 'react-router-dom/cjs/react-router-dom.min';
import Main from '../../pages/Main';
import About from '../../pages/About';
import Article from '../../pages/Article';
import Message from '../../pages/Message';
import BlogConfig from '../../pages/BlogConfig';
import ArticleEditor from "../../pages/ArticleEditor";
import './index.css';

const {Content:AntContent} = Layout;
export default function Content() {
  return (
    <AntContent style={{ margin: '0 16px' }}>
        <Switch>
            <Route path={'/about'} component={About}/>
            <Route path={'/article'} component={Article}/>
            <Route path={'/message'} component={Message}/>
            <Route path={'/config'} component={BlogConfig}/>
            <Route path={'/articleEditor'} component={ArticleEditor}/>
            <Route path={'/'} exact={true} component={Main}/>
            <Redirect to='/'/>
        </Switch>
    </AntContent>
  )
}
